feat(core): localize the agent chat interface - #2655
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Visual recap — skippedThe visual recap job did not run for this pull request. This is informational only and does not block the PR. Recap skipped for |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8b5115ccf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ? isRunning | ||
| ? `Asking ${agentName}...` | ||
| ? t("agentChat.tool.askingAgent", { agent: agentName }) | ||
| : isAgentError | ||
| ? `Error asking ${agentName}` | ||
| : `Asked ${agentName}` | ||
| ? t("agentChat.tool.askingAgentFailed", { agent: agentName }) | ||
| : t("agentChat.tool.askedAgent", { agent: agentName }) |
There was a problem hiding this comment.
Use localized labels for agent-call cards
When a non-English locale renders an agent:* or call-agent tool, these agentChat.tool.* translations are computed but never shown because the branch below returns AgentCallCell; that component still reads agentPanel.delegatedAgent.*, which only falls back to the English default catalog. The delegated-agent card therefore continues to show English statuses like “Asking/Asked/Error asking” even though the new locale catalogs contain translated tool.askingAgent labels, so pass the localized label into the card or switch the card to these keys.
Useful? React with 👍 / 👎.
|
great catch @tillkrueger02! some feedback above and merge conflicts that would be great to resolve |
…gent-chat # Conflicts: # packages/core/src/client/AssistantChat.tsx # packages/core/src/client/chat/run-recovery.tsx # packages/toolkit/src/composer/TiptapComposer.tsx
There was a problem hiding this comment.
Builder reviewed your changes and found 2 potential issues 🟡
Review Details
Incremental Code Review Summary
The latest commit addresses the two prior review findings: every locale bundle now composes the default English fallback, and legacy app overrides are normalized into the modern agentChat namespace with explicit modern values taking precedence. The previously reported duration/count formatting gaps were also corrected, and focused regression coverage was added. The overall catalog and formatting architecture remains sound, and this remains a standard-risk shared UI change.
New findings
- 🟡 MEDIUM — Voice mode still reads
agentPanel.voiceMode.*, so explicit app overrides under the modernagentChat.voiceMode.*namespace are ignored in the voice controller. This makes voice-mode override precedence inconsistent with the rest of the migration. - 🟡 MEDIUM — Core Context X-Ray still supplies its title and governance labels from legacy
contextXray.*keys, so modernagentChat.contextXray.*overrides do not apply consistently to those labels. - 🟢 LOW — The selected-context pill still formats its count with the browser locale rather than the selected application locale.
- 🟢 LOW — Message timestamps join separately formatted date and time strings with a hard-coded English comma, which can produce incorrect punctuation/order and bidi behavior in some locales.
🧪 Browser testing: Will run after this review (PR touches UI code)
| hideChat: t("agentPanel.voiceMode.hideChat"), | ||
| endVoiceMode: t("agentPanel.voiceMode.end"), | ||
| voiceSettings: t("agentPanel.voiceMode.voiceSettings"), | ||
| entryButtonLabel: t("agentPanel.voiceMode.entryButtonLabel", { |
There was a problem hiding this comment.
🟡 Read voice copy from the modern agentChat namespace
The voice controller still reads its labels from agentPanel.voiceMode.*, while the new override normalization makes agentChat.voiceMode.* the modern namespace and gives explicit modern values precedence. An app override such as agentChat.voiceMode.entryButtonLabel is therefore ignored here because the built-in legacy alias remains at agentPanel.voiceMode.*. Read from agentChat.voiceMode.* throughout voiceCopy so legacy overrides continue to normalize forward and modern overrides work consistently.
Additional Info
Found by 2 of 4 parallel reviewers.
| onPin={onPin} | ||
| onEvict={onEvict} | ||
| onRestore={onRestore} | ||
| translate={t} |
There was a problem hiding this comment.
🟡 Use modern agentChat keys for Context X-Ray labels
This wrapper still looks up titleLabel, systemOrderedLabel, and governanceLabels through legacy contextXray.* keys. Modern app overrides under agentChat.contextXray.* are normalized only forward into the modern namespace, so these labels keep the built-in legacy values while the rest of the panel uses modern keys. Change these lookups to agentChat.contextXray.* while retaining the defaults.
Additional Info
Found by 2 of 4 parallel reviewers.
…gent-chat # Conflicts: # packages/core/src/client/chat/run-recovery.spec.tsx # packages/core/src/client/chat/run-recovery.tsx
@steve8708 please let me know if anything else needs to be done for the PR. Btw love the project! |
…gent-chat # Conflicts: # packages/toolkit/src/composer/MentionPopover.tsx # packages/toolkit/src/composer/TiptapComposer.tsx
There was a problem hiding this comment.
Builder reviewed your changes and has a few items to flag 🟡
Review Details
Incremental Code Review Summary
The latest commit was reviewed by four parallel agents with the two existing voice-mode and Context X-Ray findings explicitly excluded because they remain open and unchanged. The current delta otherwise preserves the catalog fallback, compatibility normalization, RTL, and formatting architecture; no new high- or medium-severity issues were confirmed.
One low-severity localization defect remains in the new known-error mapping: the builder_auth_error normalization emits a message containing (free tier available), but the exact-string translation map omits that phrase, so this common authentication recovery message remains English in non-English locales. A previously observed selected-context count formatting gap also remains low severity.
🧪 Browser testing: Will run after this review (PR touches UI code)
…gent-chat # Conflicts: # packages/core/src/client/chat/message-components.tsx # packages/core/src/client/chat/tool-call-display.tsx
Summary
Why
The Agent Chat currently contains Core- and Toolkit-owned English strings that app catalogs cannot reliably translate.
This change gives the shared Agent Chat interface its own built-in catalogs, while allowing applications to continue overriding individual messages. It also ensures Arabic renders with the appropriate RTL direction and logical layout utilities.
Changes
agentPanelandcontextXraycatalog overrides through compatibility aliases.@agent-native/coreand@agent-native/toolkit.agentChat.*while preserving explicit new-path overrides.maininto the feature branch without force-pushing.Tests
/agent→ Chat surfacepnpm fmt:checkpassed across 14,595 filesgit diff --checkpassedpackages/docsand several templates; affected Core and Toolkit package typechecks are greenKnown Baseline Failures
The full Core test suite is not completely green in the local macOS environment. It completed with 10,640 passing tests, 1 skipped test, and 3 failures outside the changed localization surfaces:
src/cli/clean.spec.tssrc/jobs/actions/actions.spec.tsUTC, while the local environment producesEurope/Berlin.src/triggers/actions/actions.spec.tsUTC, while the local environment producesEurope/Berlin.The two timezone-dependent suites pass completely with
TZ=UTC(12/12 tests). The affected Core and Toolkit localization suites are fully green.After merging the latest upstream
main, the local full-workspace typecheck also reports errors in unchanged documentation and template packages. The affected Core and Toolkit package typechecks pass; the fresh GitHub CI run is authoritative for the newly merged upstream package build order.Screenshots
German Agent Chat
Arabic Agent Chat with RTL layout
Risk / Rollback
ShareButtonis used outside Agent Chat, so its built-in translations also improve other Core consumers.Checklist